package cn.alcatraz.handler;

import cn.alcatraz.domain.User;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

/**
* @Description: User降级
* @Author: Alcatraz
* @Version: 1.0
* @Date:  2022/8/3 20:25
*/

public class UserFallBackHandler {
    public static User getUserByIdBlockHandler(@PathVariable Long id, BlockException ex){
        return User.builder().id(-1L).intro("随便降嘛").name("流控").build();
    }
}
